﻿using System;
using System.Collections.Generic;

using Microsoft.Xna.Framework;

using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.Collision;

namespace Spacer {
    public class Missile : Projectile {
		public Missile() {}

        public Missile(SolarSys world) : base(world) {
			if( this.GetType() == typeof(Missile) ) Initialize();
        }

		public override void Initialize() {
			base.Initialize();

			DrawMode = DrawMode.Sprite;
            Sprite = Main.Sprites["Missile"];
			
			if( GetType() == typeof(Missile) ) {
				// No need for a complex object
				PhysicsInitBox( 1.3f, 0.2f, MovementMode.Normal );
				PhysicsObject.Friction = 0.3f;
				PhysicsObject.Mass = 0.1f;
			}

            Health = 10f;
			MaxHealth = 10f;

			Speed = 5f;
			DamageRadius = 4f;
            DamageAmount = 200f;
            DamageForce = 500f;

            LifeTime = 3f;
		}
    }
}
